package com.mycompany.app.testsuite;

import java.util.Calendar;
import java.util.Date;


public class CommonTest {
    protected enum Audit_Field {
        createTimestamp {
            public String toString() {

                return "createTimestamp";
            }
        },
        lastModifiedBy {
            public String toString() {

                return "lastModifiedBy";
            }
        },
        createDate {
            public String toString() {

                return "createDate";
            }
        },
        lastModifiedDate {
            public String toString() {

                return "lastModifiedDate";
            }
        }
    };

    public static void main(String[] args) {
        Date date = new Date();
        Calendar cal = Calendar.getInstance();
        //assume today is 20th of the current month
        cal.setTime(date);
        cal.set(Calendar.DAY_OF_MONTH, 20);
        date = cal.getTime();
        System.err.println(date);

    }
   
    
    protected static final String KEY_FIELDS_ELEMENT =
        " snapshot_element_id,"
      + " snapshot_date";

   protected static final String COMMON_FIELDS_ELEMENT =
          " employee_id,"
        + " element_name,"
        + " entry_name,"
        + " entry_number,"
        + " entry_code,"
        + " entry_value";
   
   protected static final String ALL_FIELDS_ELEMENT = 
       KEY_FIELDS_ELEMENT
     + ","
     + COMMON_FIELDS_ELEMENT;
    protected static final String KEY_FIELDS =
        " snapshot_id," 
      + " snapshot_date,"
      + " create_date";
  
  protected static final String COMMON_FIELDS =
        " employee_id,"
      + " termination_date,"
      + " category,"
      + " benefit_group,"
      + " cost_center_code,"
      + " labor_type,"
      + " supervisor_eid,"
      + " supervisor_name,"
      + " organization_role,"
      + " grade,"
      + " shift_code,"
      + " chinese_name,"
      + " division_code,"
      + " base_rate,"
      + " bank_account_number,"
      + " adjusted_service_date,"
      + " register_residence,"
      + " conversion_date,"
      + " last_name,"
      + " first_name,"
      + " employee_type,"
      + " middle_name,"
      + " birthday,"
      + " sex,"
      + " hire_date,"
      + " national_identifier,"
      + " government_person_file,"
      + " marital_status,"
      + " latest_hire_date,"
      + " termination_final_process_date,"
      + " termination_reason,"
      + " standard_hours,"
      + " job_title,"
      + " email,"        
      + " salary_basis,"
      + " pay_frequency_name,"
      + " bank_name,"
      + " salary_currency_code,"
      + " payroll_system_status,"
      // added by roman 10/09/2007 start
      + " parties,"
      // added by roman 10/09/2007 end
      + " job_level_guide,"
      + " finance_labor_type,"
      + " status";  
  
  public static final String DIVISIONS_IN_USE = 
      "('"
      +  "237"
      + "', '"
      + "245"
      + "')";
  
  protected static final String FilterOfElementSnapshot =
      "select hs.* from "
    + "   ( select d.employee_id, d.entry_number, max(d.from_date) as from_date"
    + "     from hi_employee_element_segment d"
    + "     where d.to_date >=?"
    + "     and d.from_date <=?"
    + "     group by d.employee_id, d.entry_number"
    + "   ) filter, hi_employee_element_segment hs"
    + " where filter.employee_id=hs.employee_id"
    + " and hs.entry_number=filter.entry_number"
    + " and hs.from_date=filter.from_date";
}
